
<template>
    <div>
      {{ msg }}
      <h3>下面是通过injetc获取的父组件appvue的数据</h3>
      {{ car }}
      <button type="button"  @click="car.price+=10">修改car</button>
    </div>
</template>
<script setup name="greadSon">
let msg=ref('我是孙组件');
const car =inject('car')
console.log('[ car ] >', car)
</script>

<style lang="less" scoped  >
//GG
</style>